<%@page import="com.team.entity.Project"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.team.entity.User" %>
 <%@ page import="com.team.util.Const" %>
 
<%@ page import="com.team.entity.Goal" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>目标</title>
	<link rel="stylesheet" href="css/prettify.css" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/bootstrap-dropdown.js"></script>
</head>
<body class="body">
<% 
	User user = (User)session.getAttribute(Const.SESSION_USER); 
	Project project =(Project)session.getAttribute(Const.SESSION_PROJ);
	
 %>
 
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">凯盛项目管理系统</a>
				 <ul class="nav pull-right">
						<li><a class="nav pull-right" href="#">用户名：<%=user.getUsername() %></a></li>
				 </ul>
			</div>
		</div>
	</div>
  
  <div class="container">
  
  
		<div class="row">
			<div class="span3">
					<div class="well" style="padding: 8px 0;">
						<ul class="nav nav-list">
						  <li class="nav-header"><%=project.getProjName() %></li>
						  <li class="divider"></li>
						  <li ><a href="info.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-home"></i>最新动态</a></li>
						  <li class="active"><a href="addGoal.jspx?_m=select"><i class="icon-white icon-flag"></i>目标</a></li>
						  <li><a href="docShare.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-folder-open"></i>资料库</a></li>
						  <li ><a href="newFolder.jspx?_m=select"><i class="icon-file"></i>文件共享</a></li>
						  <li><a href="newContact.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-user"></i>联系人</a></li>
						  <li><a href="newIdea.jspx?_m=select&id=<%=project.getId() %>"><i class="icon-fire"></i>想法</a></li>
						  <li><a href="findBug.jsp"><i class="icon-warning-sign"></i>Bug</a></li>
						  <li><a href="projReset.jsp"><i class="icon-cog"></i>项目设置</a></li>
						</ul>
					</div>
				</div>
				
				
				
				
			
		<div class="span9">	
				
					
		 <c:choose>
			<c:when test="${param.code=='1001'}">
				<div style="color:red;">项目新建失败</div>
			</c:when>
			<c:when test="${param.code=='1002'}">
				<div style="color:red;">请先登录</div>
			</c:when>
			<c:when test="${param.code=='1003'}">
				<div style="color:red;">此用户不存在</div>
			</c:when>
			<c:when test="${param.code=='1004'}">
				<div style="color:red;">用户名或密码错误</div>
			</c:when>
		</c:choose>
				<div style="float:right" class="btn-group">
          		<ul class="nav nav-pills">
                <li><a href="addGoal.jsp"><i class="icon-plus"></i>添加新目标</a></li>
                <li class="divider"></li>
              </ul>
        	</div>
        
			<div class="clear"></div>
				<%
				List<Goal> list = (List<Goal>)session.getAttribute(Const.SESSION_GOALS);
				if(list == null){
				 %>
				 <div style="color:red;"><a href="editgoal.jsp">没有记录，赶紧来建立目标吧!!</a></div>
				 <%}else {
				 for(Goal goal:list){
				  %>
				<ul style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px" class="breadcrumb">
					<li class="active">
					<%=goal.getId() %>
						<a href="addGoal.jspx?_m=find&id=<%=goal.getId() %> "><i class="icon-th"></i><%=goal.getGoalName() %></a>
					</li>
					<li style="float:right"><i class="icon-edit"></i><a class="link-black" href="addGoal.jspx?_m=edit&id=<%=goal.getId() %>">编辑</a></li>
				</ul>
				<div class="wall">
					<p><%=goal.getContent() %></p>
					<div class="progress progress-success">
						<div style="width: *;" class="bar">*</div>
					</div>
				</div>
				<%} }%>
				<div class="pagination pull-right">
					  <ul>
						<li><a href="http://192.168.0.77/pms/document.html#">Prev</a></li>
						<li class="active">
						  <a href="http://192.168.0.77/pms/document.html#">1</a>
						</li>
						<li><a href="http://192.168.0.77/pms/document.html#">2</a></li>
						<li><a href="http://192.168.0.77/pms/document.html#">3</a></li>
						<li><a href="http://192.168.0.77/pms/document.html#">4</a></li>
						<li><a href="http://192.168.0.77/pms/document.html#">Next</a></li>
					  </ul>
					</div>
			</div>	
		</div>
  </div>
	<script type="text/javascript">
	$(document).ready(function(){
		$("#btn").click(function(){
	
		  $('.dropdown-toggle').dropdown();
	
	});
	
	});
	</script>
</body>
</html>